﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _1_5 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        using (DataClassesDataContext mydata = new DataClassesDataContext())
        {
            var rd1 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "110"
                      select a;
            foreach (var r in rd1)
            {
                GHJ.Text = r.COAL_NUM==null?"":Convert.ToString(r.COAL_NUM);
            }

            var rd2 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "902"
                      select a;
            foreach (var r in rd2)
            {
                RLM.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                RLMLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
                RLMHF.Text = r.GAS_NUM == null ? "" : Convert.ToString(r.GAS_NUM);
            }

            var rd3 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "901"
                      select a;
            foreach (var r in rd3)
            {
                YLM.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                YLMLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
                YLMHF.Text = r.GAS_NUM == null ? "" : Convert.ToString(r.GAS_NUM);
            }

            var rd4 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "190"
                      select a;
            foreach (var r in rd4)
            {
                QTGT.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                QTGTLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
                QTGTHF.Text = r.GAS_NUM == null ? "" : Convert.ToString(r.GAS_NUM);
            }

            var rd5 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "903"
                      select a;
            foreach (var r in rd5)
            {
                YHJ.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
            }

            var rd6 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "312"
                      select a;
            foreach (var r in rd6)
            {
                ZY.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                ZYLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
            }


            var rd7 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "317"
                      select a;
            foreach (var r in rd7)
            {
                CY.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                CYLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
            }

            var rd8 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "500"
                      select a;
            foreach (var r in rd8)
            {
                QTYL.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                QTYLLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
            }

            var rd9 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "390"
                      select a;
            foreach (var r in rd9)
            {
                QTYT.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
                QTYTLF.Text = r.OIL_NUM == null ? "" : Convert.ToString(r.OIL_NUM);
            }

            var rd10 = from a in mydata.a01105
                      where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                      where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                      where a.CODE == "210"
                      select a;
            foreach (var r in rd10)
            {
                TRQ.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
            }

            var rd11 = from a in mydata.a01105
                       where a.qiyeid == Convert.ToInt32(Session["qiyeid"])
                       where a.DATA_YEAR == Convert.ToString(Session["ShenBaoNianDu"])
                       where a.CODE == "290"
                       select a;
            foreach (var r in rd11)
            {
                QTQT.Text = r.COAL_NUM == null ? "" : Convert.ToString(r.COAL_NUM);
            }


        }
    }
}